<template>

    <div class="modal"
         v-if="visible"
         @click="onModelClick">
    </div>

</template>

<script setup lang="ts">

    defineOptions({
        name: 'com-modal'
    })

    //region # 属性

    // 显示状态
    let visible = defineModel('visible', {
        type: Boolean,
        required: true
    })

    //endregion

    //region # 方法

    // Action

    /**
     * 点击事件
     * */
    function onModelClick() {
        visible.value = false;
    }

    // Private


    //endregion

    //region # 事件

    /**
     * 加载完毕
     * */
    onMounted(async () => {
    })
    
    //endregion

</script>

<style scoped lang="less">
    @import "./com-modal.less";
</style>